﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AssociatePremiseLookup.ascx.cs"
    Inherits="AB.ServiceDirectory.Design.WebUserControls.Lookup.AssociatePremiseLookup" %>
<asp:Panel runat="server" ID="PanelContainer" CssClass="" Visible="false">
    <div class="grid740 simplebox popup" style="z-index: 900;">
        <div class="titleh">
            <h3>
                Associate Premise</h3>
        </div>
        <div class="body">
            <div class="st-form-line">
                <asp:Label ID="LabelLocationName" CssClass="st-labeltext" runat="server" Text="Location Name"
                    AssociatedControlID="TextBoxLocationName"></asp:Label>
                <asp:TextBox ID="TextBoxLocationName" CssClass="st-forminput" runat="server" Width="200px" />
                <div class="clear">
                </div>
            </div>
            <div class="button-box">
                <asp:Button ID="ButtonSearch" runat="server" Text="Search" CssClass="st-button" CausesValidation="False"
                    OnClick="ButtonSearch_Click" />
                <asp:Button ID="ButtonClear" runat="server" Text="Clear" CssClass="st-button" CausesValidation="False"
                    OnClick="ButtonClear_Click" />
            </div>
            <div class="st-form-line">
                <asp:GridView ID="GridViewPremise" CssClass="tablesorter table-top-line" runat="server"
                    AutoGenerateColumns="False" DataKeyNames="PremiseId" AllowPaging="true" PageSize="5"
                    DataSourceID="ObjectDataSourceAssociatePremise" AllowSorting="true">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <input id="RadioButton" type="radio" name="RadioButton" value="<%# Eval("PremiseId") %>" />
                            </ItemTemplate>
                            <ItemStyle Width="10px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Location Name" SortExpression="LocationName">
                            <ItemTemplate>
                                <%# Eval("LocationName") %>
                            </ItemTemplate>
                            <HeaderStyle CssClass="header" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Address Line 1" SortExpression="AddressLine">
                            <ItemTemplate>
                                <%# Eval("Address.AddressLine") %>
                            </ItemTemplate>
                            <HeaderStyle CssClass="header" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Postcode" SortExpression="Postcode">
                            <ItemTemplate>
                                <%# Eval("Address.Postcode") %>
                            </ItemTemplate>
                            <HeaderStyle CssClass="header" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        There are no items to show.
                    </EmptyDataTemplate>
                    <PagerStyle CssClass="pagination_table" />
                </asp:GridView>
                <asp:ObjectDataSource ID="ObjectDataSourceAssociatePremise" runat="server" SelectMethod="GetList"
                    TypeName="AB.ServiceDirectory.BO.PremiseBO" EnablePaging="true" SelectCountMethod="GetListCount"
                    StartRowIndexParameterName="startRowIndex" MaximumRowsParameterName="maxRows"
                    SortParameterName="sortType" OnSelecting="ObjectDataSource_Selecting">
                    <SelectParameters>
                        <asp:Parameter Name="filter" Type="Object" ConvertEmptyStringToNull="False" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <br />
                <div class="">
                    <asp:Label ID="LabelProjectCode" AssociatedControlID="TextBoxProjectCode" runat="server" Text="Project Code" />
                    <asp:TextBox ID="TextBoxProjectCode" runat="server" CssClass="st-forminput" Width="200px" />
                    <asp:Button ID="ButtonSelect" runat="server" Text="Select" CssClass="st-button" CausesValidation="False"
                        OnClick="ButtonSelect_Click" />
                    <asp:Button ID="ButtonClose" runat="server" Text="Close" CssClass="st-button" CausesValidation="False"
                        OnClick="ButtonClose_Click" />
                </div>
            </div>
        </div>
    </div>
</asp:Panel>
